home *** CD-ROM | disk | FTP | other *** search
- global pathSeparator, cd, iswin95, hd
-
- on FullPath relativePath
- if relativePath = EMPTY then
- return EMPTY
- end if
- return cd & pathSeparator & relativePath
- end
-
- on UserCPU
- if the machineType = 256 then
- return "Intel"
- end if
- return "Motorola"
- end
-
- on GiftCPU OpSys
- if (OpSys = "DOS") or (OpSys = "Win95") or (OpSys = "Win95") or (OpSys = "Win31") then
- return "Intel"
- end if
- return "Motorola"
- end
-
- on Installable giftOS
- return GiftCPU(giftOS) = UserCPU()
- end
-
- on UserWarn giftOS
- if the machineType = 256 then
- if (giftOS = "Win31") and iswin95 then
- alert("Questo gift è per Windows 3.1 e potrebbe non funzionare correttamente nel tuo computer.")
- else
- if (giftOS = "Win95") and not iswin95 then
- alert("Questo gift è per Windows '95 e potrebbe non funzionare correttamente nel tuo computer.")
- end if
- end if
- end if
- end
-
- on CreateBatch unzipPath, giftPath, hdEntryPath, installDir, giftDir
- set CRLF to numToChar(13) & numToChar(10)
- set theBatch to "mkdir " & hdEntryPath & installDir & CRLF
- set theBatch to theBatch & "mkdir " & hdEntryPath & installDir & "\" & giftDir & CRLF
- set theBatch to theBatch & unzipPath & " "
- set theBatch to theBatch & giftPath & " "
- set theBatch to theBatch & hdEntryPath & installDir & "\" & giftDir
- set theBatch to theBatch & " -de" & CRLF
- return theBatch
- end
-
- on Install giftInstallationType, giftPath
- if the machineType = 256 then
- set dirDef to "directory"
- else
- set dirDef to "cartella"
- end if
- if giftInstallationType = "I" then
- if offset("FR_sbs", giftPath) > 0 then
- InstallFreddie()
- return
- end if
- open(giftPath)
- else
- if giftInstallationType = "CP" then
- alert("Per installare questo gift copia la " & dirDef & giftPath & " sul tuo hard disk.")
- else
- if giftInstallationType = "SCR" then
- alert("Questo è uno Screen Saver: copialo nella directory Windows per renderlo utilizzabile.")
- else
- if giftInstallationType = "SE" then
- set installedPath to char 12 to length(giftPath) of giftPath
- set theBatch to CreateBatch(hd & "helper\pkunzip.exe", giftPath & "\Install.zip", hd, "install", installedPath)
- set batchFile to FileIO(mnew, "write", hd & "helper\install.bat")
- put hd & "helper\install.bat"
- batchFile(mWriteString, theBatch)
- batchFile(mdispose)
- open(hd & "helper\install.bat")
- alert("Il gift sarà installato in " & hd & "install\" & installedPath)
- end if
- end if
- end if
- end if
- end
-
- on InstallFreddie
- set theBatch to cd & "\FR_sbs\Tbook.exe " & cd & "\FR_sbs\Install.Mmw"
- set batchFile to FileIO(mnew, "write", hd & "helper\install.bat")
- put hd & "helper\install.bat"
- batchFile(mWriteString, theBatch)
- batchFile(mdispose)
- open(hd & "helper\install.bat")
- end
-